/*
 * This file is part of b.AMP.
 * 
 * b.AMP is free software: you can redistribute it and/or modify it under 
 * the terms of the GNU Lesser General Public License as published by the 
 * Free Software Foundation, either version 3 of the License, or (at your 
 * option) any later version.
 * 
 * b.AMP is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU lesser General Public 
 * License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with b.AMP.  If not, see <http://www.gnu.org/licenses/>.
 */

#include "decoder_test.hpp"
#include <bamp/basic_message.hpp>

BAMP_DECODER_DECLARE(DecoderTest, "application/x-bamp-test");
BAMP_CLASS_LIST(bamp::DecoderPtr::cname);


DecoderTest::DecoderTest()
{

}

DecoderTest::~DecoderTest()
{

}

bamp::MessagePtr DecoderTest::getMetadata() const
{
    return new bamp::BasicMessage();
}

void DecoderTest::setHost(bamp::HostPtr host)
{

}

void DecoderTest::send(bamp::MessagePtr msg)
{

}

void DecoderTest::setInput(bamp::DataWriterPtr input)
{

}

bamp::Format DecoderTest::getInFormat(size_t chan)
{
    bamp::Format fmt = { BAMP_ENC_ANY, 48000 };
    return fmt;
}

size_t DecoderTest::getPosition() const
{
    return 0;
}

void DecoderTest::setPosition(size_t position)
{

}

bool DecoderTest::getSeekable() const
{
    return false;
}

size_t DecoderTest::getChannels() const
{
    return 1;
}

bamp::Format DecoderTest::getOutFormat(size_t chan)
{
    bamp::Format fmt = { BAMP_ENC_ANY, 48000 };
    return fmt;
}

bamp::Status DecoderTest::read(size_t chan, char* dst, size_t& size)
{
    return BAMP_READ_EOS;
}
